if CLIENT then
	function CreateList()
		
		if( not file.IsDir( "gmc_punished_players" ) ) then
			print("\nGMC - File does not exist. Let's create one...\n")
			file.CreateDir( "gmc_punished_players" )
		end
		
		if( not file.Exists( "gmc_punished_players/players.txt" ) ) then
			file.Write( "gmc_punished_players/players.txt", "Addon by Pennerlord! \nPunished players: \n\n" )
			print("GMC - Created File succesfully!\n")
		else
			print("GMC - Loaded File succesfully!\n")
			print("GMC - Addon by Pennerlord\n")
		end
	end
	CreateList()

	function AddPlayerChat( ply, text, teamOnly, playerIsDead )
		if( string.sub( text, 1, 5 ) == "!kick" ) then
			if( string.sub( text, 6 ) == nil ) then return end
			
			filex.Append("gmc_punished_players/players.txt", "Player \""..string.sub( text, 7 ).."\" was kicked!\n")
			print("Player \""..string.sub( text, 7 ).."\" was kicked!\n")
		end
		
		if( string.sub( text, 1, 4 ) == "!ban" ) then
			if( string.sub( text, 5 ) == nil ) then return end
			
			filex.Append("gmc_punished_players/players.txt", "Player \""..string.sub( text, 6 ).."\" was banned!\n")
			print("Player \""..string.sub( text, 6 ).."\" was banned!\n")
		end
	end
	hook.Add( "OnPlayerChat", "HookChatCommand", AddPlayerChat )
end